const TOKEN_KEY = 'token';
import cookies from 'cookies-js';

export const isLogin = () => {
    return !!cookies.get(TOKEN_KEY);
};

export const getToken = () => {
    return cookies.get(TOKEN_KEY);
};

export const setToken = (token) => {
    cookies.set(TOKEN_KEY, token);
};

export const clearToken = () => {
    cookies.set(TOKEN_KEY, null);
};

